//OmusicController Class

function OmusicController()
{
    this.image = null;
    this.link = null;
    this.file = null;
    this.author = null;
    this.title = null;
    this.item = 0;
    this.volume = 0;
    this.state = 0;
    this.time = 0;
    this.load = 0;
    this.mode = 'file';
};

OmusicController.prototype =
    {
	getPlayer : function()
	{
	    return document.getElementById('omusic-player');
	},

	loadFile : function(fileurl, filetit)
	{
	    this.getPlayer().loadFile(fileurl, filetit);
            //this.getPlayer().jsControl("load", fileurl);
	},

	playPause : function()
	{
	    this.getPlayer().sendEvent('playpause');
            //this.getPlayer().jsControl("pause");
	},
	
	playItem : function(num)
	{
	    this.getPlayer().sendEvent('playitem', num)
            //this.getPlayer().jsControl("play", num);
	}
    };